<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    请输入你的分数 <input class="one" type="text"> <button class="
    tow">点击查看成绩</button>
    <script>
        var one=document.getElementsByClassName("one")[0];
        var tow=document.getElementsByClassName("tow")[0];
        tow.onclick=function(){
            var box=one.value;
            if(0<box && box<60){
                alert("你的成绩不及格");
            }else if(60<=box && box<80){
                alert("你的成绩良好");
            }else if(80<=box && box<=100){
                alert("你的成绩优异"); 
            }else{
                alert("请输入正确的成绩");
            }
        }
    </script>
</body>
</html>